1. Field of the Invention
The present invention relates generally to flash, and more particularly, to a system and method for updating flash memories without loss of data.
2. Description of the Related Art
Flash memory devices are typically used for applications requiring non-volatility and in-circuit programmability. Typically, flash memory devices contain separately erasable flash blocks; namely, each flash block can be erased independently of other flash blocks. To update a particular block, it is first erased, and data is then written to the erased block. However, such an updating scheme is susceptible to loss of data if the updating process occurs during a power failure.
As shown in FIG. 1, in conventional flash memory architectures, a flash memory device 10 is typically partitioned into a number of separate flash blocks which can be individually erased. In this flash architecture, there are 16 flash blocks, each flash block 201-2016 having 64 kilobytes (xe2x80x9cKBxe2x80x9d) of memory. Every bit of the flash blocks 201-2016 is placed in an initial (xe2x80x9cSETxe2x80x9d) state. The flash memory device is written by changing the state of a bit from its SET state to a desired state. The desired state may be the SET state or an opposite (xe2x80x9cCLEARxe2x80x9d) state. Typically, bits can only be changed from SET to CLEAR, or remain in the same state. Once a bit is changed from SET to CLEAR, it cannot be changed back to SET unless it is erased. Moreover, the erasure cannot be done for individual bits, rather it is done for the entire flash block 20y (y=1,2, . . . or 16) which contains that bit.
In such conventional flash memory architectures, a block, such as block 16, is updated by first erasing the entire block and then performing a write to the block. However, since flash memories are susceptible to data loss during power failure, the top block, e.g., block 16, which is typically used as a boot block, cannot be updated.
Accordingly, there is a need in the technology for an apparatus and method for overcoming the aforementioned problem. In particular, there is a need for an apparatus and method for updating a block in flash memory so as to overcome the aforementioned problem.
The present invention is a system and method for updating memory. The contents of a first storage location in a plurality of storage locations are first copied to a second storage location in the plurality of storage locations. A signal indicating that a read operation accessing the first storage location is non-operational, is issued. The contents of the first storage location are erased. A signal indicating that a read operation accessing the first storage location is operational, is then issued.